1. Field of the Invention
The present invention relates to an image processing method, an image processing apparatus, a computer program product for image processing, and a recording medium for image processing. More specifically, the present invention relates to an image processing technique for converting color image information of an input system into color image information that falls within a color reproduction range of an output system when the color-reproduction range of the input device is different from the color reproduction range of the output device. More specifically, the present invention relates to a suitable technique for color-image output device such as a color facsimile, a color printer, and a color copier, and software for generating a color-conversion parameter employed in the image output device.
2. Description of the Related Art
Display devices such as Cathode Ray Tube (CRT) and printing devices such as printers are known as devices that output color images. These devices, however, are known to have differences in reproducible color range due to differences in manner of output. When a user tries to output images using different output devices based on identical image data, e.g., when the user tries to print an image created on a CRT using a printer, some colors may not be reproduced. Therefore, when the color image is handled on plural devices, color conversion processing called “gamut processing” is required. The “gamut processing” is a technique for mapping input color-image signals to colors reproducible in the output device.
One of the gamut processing techniques is described in Japanese Patent Application Laid-Open No. H10-84487. According to this technique, colors represented by the input color signals but irreproducible in the output device are reproduced as colors whose color difference with the original color is minimum and which is reproducible by the output device. The color difference is calculated based on difference in brightness, saturation, and hue with the use of various weights.
According to another known technique, a target projection point is set on an achromatic axis or on a chromatic axis which has the same hue as the hue of an input color signal. Then, the hue of out-of-gamut colors, i.e., colors which fall out of the gamut of the output device, is set to a fixed value and the out-of-gamut colors are subjected to compression mapping to the gamut of the output device (see Japanese Patent Application Laid-Open Nos. H9-168097 and H9-18727, for example).
When the compression mapping is performed in the gamut processing on the hue plane of the same hue as that of the input color signal as described above, hue distortion in Lab space makes blue color reproduced as violet color. A technique described in Japanese Patent No. 3337697 intends to solve this problem by defining a nonlinear line for each hue and performing the gamut processing using the nonlinear lines.
Further, as described in Japanese Patent Application Laid-Open Nos. 2000-184221, 2002-262120, and 2003-143425, it is possible to perform the conversion of an input signal value into an output signal value by first performing hue conversion and then mapping the brightness and the chroma at a hue angle obtained by the hue conversion. Further, according to a technique described in Japanese Patent Application Laid-Open No. 2001-94799, an input signal value is first converted (compressed) into a value within an intermediate mapping color reproduction range, and the converted value is further converted (expanded) into an output signal value. According to this technique, (nonlinear) brightness range adjustment, hue angle conversion, and chroma conversion are performed first, and then the brightness is mapped onto an output color reproduction range in a nonlinear manner.
The conventional gamut processing as described above have various problems in terms of optimal color control. The technique described in Japanese Patent Application Laid-Open No. H10-84487 is advantageous in that the color shift in the color reproduction processing is trivial since the mapping direction is switched to a direction where the hue difference is the least based on the shape of the color reproduction range. According to this technique, however, since the mapping direction depends on the shape of the color reproduction range of the output system, the continuity in the mapping direction sometimes cannot be maintained. As a result, continuous input colors may be mapped to discontinuous colors in various mapping directions, causing degradation in image quality such as collapse of gradation, and gradation jump.
The technique described in Japanese Patent No. 3337697 is advantageous in that the mapped hue is more acceptable for the human perception in comparison with the hue obtained in the hue-fixed gamut processing in the Lab space as in the Japanese Patent Application Laid-Open Nos. H9-168097 and H9-18727 since the nonlinear lines are set for chroma-based correction of hue distortion. However, this technique basically intends to perform compression mapping to the same hue of the input color signal. Therefore, the shape of the gamut of the printer is not taken into consideration in determining the reproduced hue.
Contrary to the above-mentioned techniques, the techniques described in Japanese Patent Application Laid-Open Nos. 2000-184221, 2002-262120, 2003-143425, and 2001-94799 take into consideration the shape of the gamut of the printer in determining the reproduced hue of a specific color and control the entire hue in line with the reproduced hue of the specific color. These techniques are advantageous in that colors can be reproduced more clearly than in mapping of the saturated colors of the primary and the secondary colors onto colors of the same hue, and that a reproduced color can be more close to the expectation of the user. These techniques, however, perform the identical hue conversion to the colors on the same hue plane or of the same saturation. Therefore, though the hue continuity is easily maintained, the colors for which no hue correction is required are also corrected.
The above problem will be described in more detail. FIG. 19 is a graph of a relation between a gamut of a display and a gamut of a printer for a cyan hue. In FIG. 19, the colors represented by a portion surrounded by a dotted line cannot be reproduced by a printer, and therefore need to be mapped to reproducible colors. When the above-described technique is employed, the color reproduction can be achieved with a minimum color shift particularly with respect to the saturated colors. However, colors other than the saturated colors are all reproduced in the same hue as the hue of the saturated colors. Therefore, the color shift becomes highly noticeable. The colors represented by a bold line in FIG. 19 are examples of colors to which the hue correction is performed even though these colors are reproducible in the printer. Particularly in a shadow area, the reproduced colors are largely different from colors shown on the display.
The technique of Japanese Patent Application Laid-Open No. 2001-94799 can control the hue angle more subtly than the techniques mentioned above since this technique employs a hue mapping function that corresponds to the brightness. However, since the (nonlinear) brightness range adjustment, the hue angle conversion, and the brightness conversion are performed independently of each other, the input color signal is sometimes converted into an unintended printer output color, and sometimes the gradation jump cannot be suppressed. Further, when the adjustment of hue angle is desired, the hue mapping function must be corrected for each level of brightness in consideration of continuity. Thus, the color adjustment becomes complicated.
As described above, the color gamut processing according to the conventional techniques has difficulties in performing appropriate hue control in such a manner that the hue continuity and constancy in appearance are maintained for continuous colors ranging from white, a specific color, and to black. For example, when the hue of the primary cyan color of the display is shifted for reproduction to a preferable color, the hue of the intermediate colors placed between the cyan and black is also shifted even when these colors are reproducible in the printer.